<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-X-admin2.2</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="./css/font.css">
        <link rel="stylesheet" href="./css/xadmin.css">
        <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
        <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="./js/xadmin.js"></script>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
            <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
            <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]--></head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row">
                <div class="layui-card-body layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <tr align="center">
                            <td style="font-size: 16px;">模板名称</td>
                            <td><input type="text" name="modename" id="modename" class="layui-input" placeholder="请输入模板名称" required></td>
                        </tr>
                        <tr align="center">
                            <td rowspan="2" style="font-size: 16px;">需求调研</td>
                                <td align="left"><input type="checkbox" lay-filter="xqdy_Cpjl" name="xqdyCpjl" id="xqdyCpjl" title="产品经理" checked></td></tr>
                                <tr><td><input type="checkbox" name="xqdyXqfxs" id="xqdyXqfxs" lay-filter="xqdy_Xqfxs" title="需求分析师" checked></td></tr>
                        <tr align="center">
                            <td rowspan="6" style="font-size: 16px;">系统设计</td>
                                <td align="left"><input type="checkbox" name="xtsjCpjl" id="xtsjCpjl" lay-filter="xtkf_Cpjl" title="产品经理" checked></td></tr>
                                <tr><td><input type="checkbox" name="xtsjYyjgsjs" id="xtsjYyjgsjs" lay-filter="xtkf_Yyjgsjs" title="应用架构师" checked></td></tr>
                                <tr><td><input type="checkbox" name="xtsjJcptsjs" id="xtsjJcptsjs" lay-filter="xtkf_Jcptsjs" title="基础平台设计师" checked></td></tr>
                                <tr><td><input type="checkbox" name="xtsjKhdappsjs" id="xtsjKhdappsjs" lay-filter="xtkf_Khdappsjs"  title="客户端(APP)设计师" checked></td></tr>
                                <tr><td><input type="checkbox" name="xtsjQdsjs" id="xtsjQdsjs" lay-filter="xtkf_Qdsjs" title="前端设计师" checked></td></tr>
                                <tr><td><input type="checkbox" name="xtsjUisjs" id="xtsjUisjs" lay-filter="xtkf_Uisjs" title="UI设计师" checked></td></tr>
                        <tr align="center">
                            <td rowspan="5" style="font-size: 16px;">系统开发</td>
                                <td align="left"><input type="checkbox" name="xtkfJavayfgcs" id="xtkfJavayfgcs" lay-filter="xtkf_Javayfgcs" title="java研发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" name="xtkfAzkfgcs" id="xtkfAzkfgcs" lay-filter="xtkf_Azkfgcs" title="安卓开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" name="xtkfPgkfgcs" id="xtkfPgkfgcs" lay-filter="xtkf_Pgkfgcs" title="苹果开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" name="xtkfCkfgcs" id="xtkfCkfgcs" lay-filter="xtkf_Ckfgcs" title="C#开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" name="xtkfQdkfgcs" id="xtkfQdkfgcs" lay-filter="xtkf_Qdkfgcs" title="前端开发工程师" checked></td></tr>
                        <tr align="center"><td align="center" style="font-size: 16px;">系统测试</td>
                            <td align="left"><input type="checkbox" name="xtcsCsgcs" id="xtcsCsgcs" lay-filter="xtcs_Csgcs" title="测试工程师" checked></td></tr>
                        <tr align="center"><td style="font-size: 16px;">业务支撑</td>
                            <td align="left"><input type="checkbox" name="ywzcYwjl" lay-filter="ywzc_Ywjl" id="ywzcYwjl" title="业务经理" checked></td></tr>
                        <tr align="center"><td style="font-size: 16px;">系统实施</td>
                            <td align="left"><input type="checkbox" name="xtssSsgcs" lay-filter="xtss_Ssgcs" id="xtssSsgcs" title="实施工程师" checked></td></tr>
                        <tr align="center"><td style="font-size: 16px;">项目管理</td>
                            <td align="left" style="font-size: 16px;"><input type="checkbox" lay-filter="xmgl_Xmzj" name="xmglXmzj" id="xmglXmzj" title="项目总监" checked></td></tr>
                        <tr align="center"><td style="font-size: 16px;">技术管理</td>
                            <td align="left"><input type="checkbox" name="jsglJszj" id="jsglJszj"  lay-filter="jsgl_Jszj" title="技术总监" checked></td></tr>
                        <tr align="center">
                            <td rowspan="13" style="font-size: 16px;">二级系统——基础平台</td>
                                <td align="left"><input type="checkbox" lay-filter="jcpt_Cpjl" name="jcptCpjl" id="jcptCpjl" title="产品经理" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Xqfxs" name="jcptXqfxs" id="jcptXqfxs" title="需求分析师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Yyjgsjs" name="jcptYyjgsjs" id="jcptYyjgsjs" title="应用架构师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Jcptsjs" name="jcptJcptsjs" id="jcptJcptsjs" title="基础平台设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Khdappsjs" name="jcptKhdappsjs" id="jcptKhdappsjs" title="客户端(APP)设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Qdsjs" name="jcptQdsjs" id="jcptQdsjs" title="前端设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Uisjs" name="jcptUisjs" id="jcptUisjs" title="UI设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Javayfgcs" name="jcptJavayfgcs" id="jcptJavayfgcs" title="java研发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Azkfgcs" name="jcptAzkfgcs" id="jcptAzkfgcs" title="安卓开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Pgkfgcs" name="jcptPgkfgcs" id="jcptPgkfgcs" title="苹果开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Ckfgcs" name="jcptCkfgcs" id="jcptCkfgcs" title="C#开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Qdkfgcs" name="jcptQdkfgcs" id="jcptQdkfgcs" title="前端开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jcpt_Csgcs" name="jcptCsgcs" id="jcptCsgcs" title="测试工程师" checked></td></tr>
                        <tr align="center">
                            <td rowspan="13" style="font-size: 16px;">二级系统——应用层</td>
                                <td align="left"><input type="checkbox" lay-filter="yyc_Cpjl" name="yycCpjl" id="yycCpjl" title="产品经理" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Xqfxs" name="yycXqfxs" id="yycXqfxs" title="需求分析师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Yyjgsjs" name="yycYyjgsjs" id="yycYyjgsjs" title="应用架构师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_jcptsjs" name="yycJcptsjs" id="yycJcptsjs" title="基础平台设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Khdappsjs" name="yycKhdappsjs" id="yycKhdappsjs" title="客户端(APP)设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Qdsjs" name="yycQdsjs" id="yycQdsjs" title="前端设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Uisjs" name="yycUisjs" id="yycUisjs" title="UI设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Javayfgcs" name="yycJavayfgcs" id="yycJavayfgcs" title="java研发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Azkfgcs" name="yycAzkfgcs" id="yycAzkfgcs" title="安卓开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Pgkfgcs" name="yycPgkfgcs" id="yycPgkfgcs" title="苹果开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Ckfgcs" name="yycCkfgcs" id="yycCkfgcs" title="C#开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Qdkfgcs" name="yycQdkfgcs" id="yycQdkfgcs" title="前端开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="yyc_Csgcs" name="yycCsgcs" id="yycCsgcs" title="测试工程师" checked></td></tr>
                        <tr align="center">
                            <td rowspan="13" style="font-size: 16px;">二级系统——接口层</td>
                                <td align="left"><input type="checkbox" lay-filter="jkc_Cpjl" name="jkcCpjl" id="jkcCpjl" title="产品经理" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Xqfxs" name="jkcXqfxs" id="jkcXqfxs" title="需求分析师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Yyjgsjs" name="jkcYyjgsjs" id="jkcYyjgsjs" title="应用架构师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_jcptsjs" name="jkcJcptsjs" id="jkcJcptsjs" title="基础平台设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Khdappsjs" name="jkcKhdappsjs" id="jkcKhdappsjs" title="客户端(APP)设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Qdsjs" name="jkcQdsjs" id="jkcQdsjs" title="前端设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Uisjs" name="jkcUisjs" id="jkcUisjs" title="UI设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Javayfgcs" name="jkcJavayfgcs" id="jkcJavayfgcs" title="java研发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Azkfgcs" name="jkcAzkfgcs" id="jkcAzkfgcs" title="安卓开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Pgkfgcs" name="jkcPgkfgcs" id="jkcPgkfgcs" title="苹果开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Ckfgcs" name="jkcCkfgcs" id="jkcCkfgcs" title="C#开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Qdkfgcs" name="jkcQdkfgcs" id="jkcQdkfgcs" title="前端开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="jkc_Csgcs" name="jkcCsgcs" id="jkcCsgcs" title="测试工程师" checked></td></tr>

                        <tr align="center">
                            <td rowspan="13" style="font-size: 16px;">二级系统——服务层</td>
                                <td align="left"><input type="checkbox" lay-filter="fwc_Cpjl" name="fwcCpjl" id="fwcCpjl" title="产品经理" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Xqfxs" name="fwcXqfxs" id="fwcXqfxs" title="需求分析师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Yyjgsjs" name="fwcYyjgsjs" id="fwcYyjgsjs" title="应用架构师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_jcptsjs" name="fwcjcptsjs" id="fwcjcptsjs" title="基础平台设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Khdappsjs" name="fwcKhdappsjs" id="fwcKhdappsjs" title="客户端(APP)设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Qdsjs" name="fwcQdsjs" id="fwcQdsjs" title="前端设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Uisjs" name="fwcUisjs" id="fwcUisjs" title="UI设计师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Javayfgcs" name="fwcJavayfgcs" id="fwcJavayfgcs" title="java研发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Azkfgcs" name="fwcAzkfgcs" id="fwcAzkfgcs" title="安卓开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Pgkfgcs" name="fwcPgkfgcs" id="fwcPgkfgcs" title="苹果开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Ckfgcs" name="fwcCkfgcs" id="fwcCkfgcs" title="C#开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Qdkfgcs" name="fwcQdkfgcs" id="fwcQdkfgcs" title="前端开发工程师" checked></td></tr>
                                <tr><td><input type="checkbox" lay-filter="fwc_Csgcs" name="fwcCsgcs" id="fwcCsgcs" title="测试工程师" checked></td></tr>
                    </table>
                    <div style="text-align: right;">
                        <button class="layui-btn layui-btn-lg layui-btn-normal" lay-submit lay-filter="change_template" id="btn_edit_template"><i class="iconfont">&#xe747; </i> 修改模板</button></div>
                </div>
            </div>
        </div>
       <script>layui.use(['form'],function (){});
            function GetRequest() {
                var url = location.search; //获取url中"?"符后的字串
                var theRequest = new Object();
                if (url.indexOf("?") != -1) {
                    var str = url.substr(1);
                    strs = str.split("&");
                    for (var i = 0; i < strs.length; i++) {
                        theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
                    }
                }
                return theRequest;
            }
            function setStyle(data, arr, filterObj){
                layui.use('form', function () {
                    var form = layui.form;
                    //var t = 'checkbox(' + filterObj +')';
                    if(data == null || data != 1 ) {
                        //console.log(arr);
                        $('#'+arr).prop('checked', false);
                    }
                    else
                        $('#'+arr).prop('checked', true);
                    form.render('checkbox');
                });
            }
           function setNum(idName){
               //console.log(idName + ".check=" + $('#'+idName).prop("checked"));
               if($('#'+idName).prop("checked") == true){
                   return 1;
               } else {
                   return 0;
               }
           }
        </script>

        <script>
            function setFalse(idName) {
                $('#'+idName).prop('checked', false);
                $('#'+idName).prop('disabled', 'disabled');
            }
            function setTrue(idName) {
                $('#'+idName).prop('checked', true);
                $('#'+idName).prop('disabled', '');
            }

              layui.use('form', function () {
                    var form = layui.form;
                    form.on('checkbox(xqdy_Xqfxs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptXqfxs');
                            setTrue('yycXqfxs');
                            setTrue('jkcXqfxs');
                            setTrue('fwcXqfxs');
                        } else {
                           setFalse('jcptXqfxs');
                           setFalse('yycXqfxs');
                           setFalse('jkcXqfxs');
                           setFalse('fwcXqfxs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Yyjgsjs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptYyjgsjs');
                            setTrue('yycYyjgsjs');
                            setTrue('jkcYyjgsjs');
                            setTrue('fwcYyjgsjs');
                        } else {
                            setFalse('jcptYyjgsjs');
                            setFalse('yycYyjgsjs');
                            setFalse('jkcYyjgsjs');
                            setFalse('fwcYyjgsjs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Cpjl)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptCpjl');
                            setTrue('yycCpjl');
                            setTrue('jkcCpjl');
                            setTrue('fwcCpjl');
                        } else {
                           setFalse('jcptCpjl');
                           setFalse('yycCpjl');
                           setFalse('jkcCpjl');
                           setFalse('fwcCpjl');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Jcptsjs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptJcptsjs');
                            setTrue('yycJcptsjs');
                            setTrue('jkcJcptsjs');
                            setTrue('fwcJcptsjs');
                        } else {
                            setFalse('jcptJcptsjs');
                            setFalse('yycJcptsjs');
                            setFalse('jkcJcptsjs');
                            setFalse('fwcJcptsjs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Khdappsjs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptKhdappsjs');
                            setTrue('yycKhdappsjs');
                            setTrue('jkcKhdappsjs');
                            setTrue('fwcKhdappsjs');
                        } else {
                           setFalse('jcptKhdappsjs');
                           setFalse('yycKhdappsjs');
                           setFalse('jkcKhdappsjs');
                           setFalse('fwcKhdappsjs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Qdsjs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptQdsjs');
                            setTrue('yycQdsjs');
                            setTrue('jkcQdsjs');
                            setTrue('fwcQdsjs');
                        } else {
                            setFalse('jcptQdsjs');
                            setFalse('yycQdsjs');
                            setFalse('jkcQdsjs');
                            setFalse('fwcQdsjs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Uisjs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptUisjs');
                            setTrue('yycUisjs');
                            setTrue('jkcUisjs');
                            setTrue('fwcUisjs');
                        } else {
                           setFalse('jcptUisjs');
                           setFalse('yycUisjs');
                           setFalse('jkcUisjs');
                           setFalse('fwcUisjs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Javayfgcs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptJavayfgcs');
                            setTrue('yycJavayfgcs');
                            setTrue('jkcJavayfgcs');
                            setTrue('fwcJavayfgcs');
                        } else {
                            setFalse('jcptJavayfgcs');
                            setFalse('yycJavayfgcs');
                            setFalse('jkcJavayfgcs');
                            setFalse('fwcJavayfgcs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Azkfgcs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptAzkfgcs');
                            setTrue('yycAzkfgcs');
                            setTrue('jkcAzkfgcs');
                            setTrue('fwcAzkfgcs');
                        } else {
                           setFalse('jcptAzkfgcs');
                           setFalse('yycAzkfgcs');
                           setFalse('jkcAzkfgcs');
                           setFalse('fwcAzkfgcs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Pgkfgcs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptPgkfgcs');
                            setTrue('yycPgkfgcs');
                            setTrue('jkcPgkfgcs');
                            setTrue('fwcPgkfgcs');
                        } else {
                            setFalse('jcptPgkfgcs');
                            setFalse('yycPgkfgcs');
                            setFalse('jkcPgkfgcs');
                            setFalse('fwcPgkfgcs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Ckfgcs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptCkfgcs');
                            setTrue('yycCkfgcs');
                            setTrue('jkcCkfgcs');
                            setTrue('fwcCkfgcs');
                        } else {
                           setFalse('jcptCkfgcs');
                           setFalse('yycCkfgcs');
                           setFalse('jkcCkfgcs');
                           setFalse('fwcCkfgcs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtkf_Qdkfgcs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptQdkfgcs');
                            setTrue('yycQdkfgcs');
                            setTrue('jkcQdkfgcs');
                            setTrue('fwcQdkfgcs');
                        } else {
                            setFalse('jcptQdkfgcs');
                            setFalse('yycQdkfgcs');
                            setFalse('jkcQdkfgcs');
                            setFalse('fwcQdkfgcs');
                        }
                        form.render('checkbox');
                    });
                    form.on('checkbox(xtcs_Csgcs)', function (data) {
                        if(data.elem.checked == true) {
                            setTrue('jcptCsgcs');
                            setTrue('yycCsgcs');
                            setTrue('jkcCsgcs');
                            setTrue('fwcCsgcs');
                        } else {
                           setFalse('jcptCsgcs');
                           setFalse('yycCsgcs');
                           setFalse('jkcCsgcs');
                           setFalse('fwcCsgcs');
                        }
                        form.render('checkbox');
                    });
                });

        </script>

        <script>
            var a=GetRequest();
            var modeId=a['modeId'];
            var arr = new Array();
            $.ajax({
                url:"/template/findById",
                //url: "json/table/htMode.json",
                method: "get",
                data: {
                    'modeId' : modeId
                },
                success:function(info){
                    //var info = JSON.parse(res)
                    console.log(info);
                    //alert("加载数据");
                    if(info.msg == "success") {
                        $('#modename').val(info.data.template.modeName);
                        setStyle(info.data.template.xqdyCpjl, 'xqdyCpjl', 'xqdy_Cpjl');
                        setStyle(info.data.template.xqdyXqfxs, 'xqdyXqfxs', 'xqdy_Xqfxs');
                        setStyle(info.data.template.xtsjCpjl, 'xtsjCpjl', 'xtsj_Cpjl');
                        setStyle(info.data.template.xtsjYyjgsjs, 'xtsjYyjgsjs', 'xtsj_Yyjgsjs');
                        setStyle(info.data.template.xtsjJcptsjs, 'xtsjJcptsjs', 'xtsj_Jcptsjs');
                        setStyle(info.data.template.xtsjKhdapisjs, 'xtsjKhdappsjs', 'xtsj_Khdappsjs');
                        setStyle(info.data.template.xtsjQdsjfxs, 'xtsjQdsjs', 'xtsj_Qdsjs');
                        setStyle(info.data.template.xtsjUisjs, 'xtsjUisjs', 'xtsj_Uisjs');
                        setStyle(info.data.template.xtkfJavayfgcs, 'xtkfJavayfgcs', 'xtkf_Javayfgcs');
                        setStyle(info.data.template.xtkfAzkfgcs, 'xtkfAzkfgcs', 'xtkf_Azkfgcs');
                        setStyle(info.data.template.xtkfPgkfgcs, 'xtkfPgkfgcs', 'xtkf_Pgkfgcs');
                        setStyle(info.data.template.xtkfCkfgcs, 'xtkfCkfgcs', 'xtkf_Ckfgcs');
                        setStyle(info.data.template.xtkfQdkfgcs, 'xtkfQdkfgcs', 'xtkf_Qdkfgcs');
                        setStyle(info.data.template.xtcsCsgcs, 'xtcsCsgcs', 'xtcs_Csgcs');
                        setStyle(info.data.template.ywzcYwjl, 'ywzcYwjl', 'ywzc_Ywjl');
                        setStyle(info.data.template.xtssSsgcs, 'xtssSsgcs', 'xtss_Ssgcs');
                        setStyle(info.data.template.xmglXmzj, 'xmglXmzj', 'xmgl_Xmzj');
                        setStyle(info.data.template.jsglJszj, 'jsglJszj', 'jsgl_Jszj');
                        setStyle(info.data.template.jcptCpjl, 'jcptCpjl', 'jcpt_Cpjl');
                        setStyle(info.data.template.jcptXqfxs, 'jcptXqfxs', 'jcpt_Xqfxs');
                        setStyle(info.data.template.jcptYyjgsjs, 'jcptYyjgsjs', 'jcpt_Yyjgsjs');
                        setStyle(info.data.template.jcptJcptsjs, 'jcptJcptsjs', 'jcpt_Jcptsjs');
                        setStyle(info.data.template.jcptKhdappsjs, 'jcptKhdappsjs', 'jcpt_Khdappsjs');
                        setStyle(info.data.template.jcptQdsjsjs, 'jcptQdsjs', 'jcpt_Qdsjs');
                        setStyle(info.data.template.jcptUisjs, 'jcptUisjs', 'jcpt_Uisjs');
                        setStyle(info.data.template.jcptJavayfgcs, 'jcptJavayfgcs', 'jcpt_Javayfgcs');
                        setStyle(info.data.template.jcptAzkfgcs, 'jcptAzkfgcs', 'jcpt_Azkfgcs');
                        setStyle(info.data.template.jcptPgkfgcs, 'jcptPgkfgcs', 'jcpt_Pgkfgcs');
                        setStyle(info.data.template.jcptCkfgcs, 'jcptCkfgcs', 'jcpt_Ckfgcs');
                        setStyle(info.data.template.jcptQdkfgcs, 'jcptQdkfgcs', 'jcpt_Qdkfgcs');
                        setStyle(info.data.template.jcptCsgcs, 'jcptCsgcs', 'jcpt_Csgcs');
                        setStyle(info.data.template.yycCpjl, 'yycCpjl', 'yyc_Cpjl');
                        setStyle(info.data.template.yycXqfxs, 'yycXqfxs', 'yyc_Xqfxs');
                        setStyle(info.data.template.yycYyjgsjs, 'yycYyjgsjs', 'yyc_Yyjgsjs');
                        setStyle(info.data.template.yycJpctsjs, 'yycJcptsjs', 'yyc_Jcptsjs');
                        setStyle(info.data.template.yycKhdappsjs, 'yycKhdappsjs', 'yyc_Khdappsjs');
                        setStyle(info.data.template.yycQdsjsjs, 'yycQdsjs', 'yyc_Qdsjs');
                        setStyle(info.data.template.yycUisjs, 'yycUisjs', 'yyc_Uisjs');
                        setStyle(info.data.template.yycJavayfgcs, 'yycJavayfgcs', 'yyc_Javayfgcs');
                        setStyle(info.data.template.yycAzkfgcs, 'yycAzkfgcs', 'yyc_Azkfgcs');
                        setStyle(info.data.template.yycPgkfgcs, 'yycPgkfgcs', 'yyc_Pgkfgcs');
                        setStyle(info.data.template.yycCkfgcs, 'yycCkfgcs', 'yyc_Ckfgcs');
                        setStyle(info.data.template.yycQdkfgcs, 'yycQdkfgcs', 'yyc_Qdkfgcs');
                        setStyle(info.data.template.yycCsgcs, 'yycCsgcs', 'yyc_Csgcs');
                        setStyle(info.data.template.jkcCpjl, 'jkcCpjl', 'jkc_Cpjl');
                        setStyle(info.data.template.jkcXqfxs, 'jkcXqfxs', 'jkc_Xqfxs');
                        setStyle(info.data.template.jkcYyjgsjs, 'jkcYyjgsjs', 'jkc_Yyjgsjs');
                        setStyle(info.data.template.jkcJcptsjs, 'jkcJcptsjs', 'jkc_Jcptsjs');
                        setStyle(info.data.template.jkcKhdappsjs, 'jkcKhdappsjs', 'jkc_Khdappsjs');
                        setStyle(info.data.template.jkcQdsjsjs, 'jkcQdsjs', 'jkc_Qdsjs');
                        setStyle(info.data.template.jkcUisjs, 'jkcUisjs', 'jkc_Uisjs');
                        setStyle(info.data.template.jkcJavayfgcs, 'jkcJavayfgcs', 'jkc_Javayfgcs');
                        setStyle(info.data.template.jkcAzkfgcs, 'jkcAzkfgcs', 'jkc_Azkfgcs');
                        setStyle(info.data.template.jkcPgkfgcs, 'jkcPgkfgcs', 'jkc_Pgkfgcs');
                        setStyle(info.data.template.jkcCkfgcs, 'jkcCkfgcs', 'jkc_Ckfgcs');
                        setStyle(info.data.template.jkcQdkfgcs, 'jkcQdkfgcs', 'jkc_Qdkfgcs');
                        setStyle(info.data.template.jkcCsgcs, 'jkcCsgcs', 'jkc_Csgcs');
                        setStyle(info.data.template.fwcCpjl, 'fwcCpjl', 'fwc_Cpjl');
                        setStyle(info.data.template.fwcXqfxs, 'fwcXqfxs', 'fwc_Xqfxs');
                        setStyle(info.data.template.fwcYyjgsjs, 'fwcYyjgsjs', 'fwc_Yyjgsjs');
                        setStyle(info.data.template.fwcJcptsjs, 'fwcJcptsjs', 'fwc_Jcptsjs');
                        setStyle(info.data.template.fwcKhdappsjs, 'fwcKhdappsjs', 'fwc_Khdappsjs');
                        setStyle(info.data.template.fwcQdsjsjs, 'fwcQdsjs', 'fwc_Qdsjs');
                        setStyle(info.data.template.fwcUisjs, 'fwcUisjs', 'fwc_Uisjs');
                        setStyle(info.data.template.fwcJavayfgcs, 'fwcJavayfgcs', 'fwc_Javayfgcs');
                        setStyle(info.data.template.fwcAzkfgcs, 'fwcAzkfgcs', 'fwc_Azkfgcs');
                        setStyle(info.data.template.fwcPgkfgcs, 'fwcPgkfgcs', 'fwc_Pgkfgcs');
                        setStyle(info.data.template.fwcCkfgcs, 'fwcCkfgcs', 'fwc_Ckfgcs');
                        setStyle(info.data.template.fwcQdkfgcs, 'fwcQdkfgcs', 'fwc_Qdkfgcs');
                        setStyle(info.data.template.fwcCsgcs, 'fwcCsgcs', 'fwc_Csgcs');
                    }
                }
            });
        </script>
<script>
    $(function  () {
        layui.use('form', function(){
            var a=GetRequest();
            var modeId=a['modeId'];
            var form = layui.form;
            form.on('submit(change_template)', function(data){
                layer.confirm('是否要修改该模板信息?', {icon: 3, title:'警告'}, function(index) {
                    $.ajax({
                        type: 'post',
                        dataType: "json",
                        contentType : "application/json",
                        url:"/template/update",
                        data: JSON.stringify({
                            'modeId': modeId,
                            'modeName': $('#modename').val(),
                            'xqdyCpjl' : setNum('xqdyCpjl'),
                            'xqdyXqfxs' : setNum('xqdyXqfxs'),
                            'xtsjCpjl' : setNum('xtsjCpjl'),
                            'xtsjYyjgsjs' : setNum('xtsjYyjgsjs'),
                            'xtsjJcptsjs' : setNum('xtsjJcptsjs'),
                            'xtsjKhdapisjs' : setNum('xtsjKhdappsjs'),
                            'xtsjQdsjfxs' : setNum('xtsjQdsjs'),
                            'xtsjUisjs' : setNum('xtsjUisjs'),
                            'xtkfJavayfgcs' : setNum('xtkfJavayfgcs'),
                            'xtkfAzkfgcs' : setNum('xtkfAzkfgcs'),
                            'xtkfPgkfgcs' : setNum('xtkfPgkfgcs'),
                            'xtkfCkfgcs' : setNum('xtkfCkfgcs'),
                            'xtkfQdkfgcs' : setNum('xtkfQdkfgcs'),
                            'xtcsCsgcs' : setNum('xtcsCsgcs'),
                            'ywzcYwjl' : setNum('ywzcYwjl'),
                            'xtssSsgcs' : setNum('xtssSsgcs'),
                            'xmglXmzj' : setNum('xmglXmzj'),
                            'jsglJszj' : setNum('jsglJszj'),
                            'jcptCpjl' : setNum('jcptCpjl'),
                            'jcptXqfxs' : setNum('jcptXqfxs'),
                            'jcptYyjgsjs' : setNum('jcptYyjgsjs'),
                            'jcptJcptsjs' : setNum('jcptJcptsjs'),
                            'jcptKhdappsjs' : setNum('jcptKhdappsjs'),
                            'jcptQdsjsjs' : setNum('jcptQdsjsjs'),
                            'jcptUisjs' : setNum('jcptUisjs'),
                            'jcptJavayfgcs' : setNum('jcptJavayfgcs'),
                            'jcptAzkfgcs' : setNum('jcptAzkfgcs'),
                            'jcptPgkfgcs' : setNum('jcptPgkfgcs'),
                            'jcptCkfgcs' : setNum('jcptCkfgcs'),
                            'jcptQdkfgcs' : setNum('jcptQdkfgcs'),
                            'jcptCsgcs' : setNum('jcptCsgcs'),
                            'yycCpjl' : setNum('yycCpjl'),
                            'yycXqfxs' : setNum('yycXqfxs'),
                            'yycYyjgsjs' : setNum('yycYyjgsjs'),
                            'yycJcptsjs' : setNum('yycJcptsjs'),
                            'yycKhdappsjs' : setNum('yycKhdappsjs'),
                            'yycQdsjsjs' : setNum('yycQdsjsjs'),
                            'yycUisjs' : setNum('yycUisjs'),
                            'yycJavayfgcs' : setNum('yycJavayfgcs'),
                            'yycAzkfgcs' : setNum('yycAzkfgcs'),
                            'yycPgkfgcs' : setNum('yycPgkfgcs'),
                            'yycCkfgcs' : setNum('yycCkfgcs'),
                            'yycQdkfgcs' : setNum('yycQdkfgcs'),
                            'yycCsgcs' : setNum('yycCsgcs'),
                            'jkcCpjl' : setNum('jkcCpjl'),
                            'jkcXqfxs' : setNum('jkcXqfxs'),
                            'jkcYyjgsjs' : setNum('jkcYyjgsjs'),
                            'jkcJcptsjs' : setNum('jkcJcptsjs'),
                            'jkcKhdappsjs' : setNum('jkcKhdappsjs'),
                            'jkcQdsjsjs' : setNum('jkcQdsjsjs'),
                            'jkcUisjs' : setNum('jkcUisjs'),
                            'jkcJavayfgcs' : setNum('jkcJavayfgcs'),
                            'jkcAzkfgcs' : setNum('jkcAzkfgcs'),
                            'jkcPgkfgcs' : setNum('jkcPgkfgcs'),
                            'jkcCkfgcs' : setNum('jkcCkfgcs'),
                            'jkcQdkfgcs' : setNum('jkcQdkfgcs'),
                            'jkcCsgcs' : setNum('jkcCsgcs'),
                            'fwcCpjl' : setNum('fwcCpjl'),
                            'fwcXqfxs' : setNum('fwcXqfxs'),
                            'fwcYyjgsjs' : setNum('fwcYyjgsjs'),
                            'fwcJcptsjs' : setNum('fwcJcptsjs'),
                            'fwcKhdappsjs' : setNum('fwcKhdappsjs'),
                            'fwcQdsjsjs' : setNum('fwcQdsjsjs'),
                            'fwcUisjs' : setNum('fwcUisjs'),
                            'fwcJavayfgcs' : setNum('fwcJavayfgcs'),
                            'fwcAzkfgcs' : setNum('fwcAzkfgcs'),
                            'fwcPgkfgcs' : setNum('fwcPgkfgcs'),
                            'fwcCkfgcs' : setNum('fwcCkfgcs'),
                            'fwcQdkfgcs' : setNum('fwcQdkfgcs'),
                            'fwcCsgcs' : setNum('fwcCsgcs')
                        }),
                        success: function (res) {
                            console.log(res);
                            if(res.msg == 'success') {
                                layer.msg("修改成功！ 页面即将关闭！ ");
                                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                                console.log(index);
                                setTimeout(
                                    function(){
                                        parent.layui.table.reload('list',{
                                            page: {curr: 1}
                                        });
                                        parent.layer.close(index);//关闭弹出的子页面窗口*!/
                                    },1000)
                            } else {
                                layer.msg('修改失败');
                            }
                        }
                    })
                    layer.close(index);
                });
                return false;
            });
        });
    })
</script>
    </body>
</html>


